package com.jeespring.system.service.impl;

import com.jeespring.common.dto.ZtreeNode;
import com.jeespring.system.dao.DepartmentDao;
import com.jeespring.system.entity.Department;
import com.jeespring.system.service.DepartmentService;
import org.apache.dubbo.config.annotation.Service;
import org.springframework.beans.factory.annotation.Autowired;

import java.util.List;

/**
 * @Title: DepartmentServiceImpl
 * @Description:
 * @Author 张朝阳
 * @Date 2020/1/4 1:08
 */
@Service
public class DepartmentServiceImpl implements DepartmentService {

    @Autowired
    private DepartmentDao departmentDao;

    @Override
    public List<Department> select(Department department) {
        List<Department> departmentList = departmentDao.select(department);
        return departmentList;
    }

    @Override
    public List<Department> selectAll() {
        List<Department> departmentList = departmentDao.selectAll();
        return departmentList;
    }

    @Override
    public List<ZtreeNode> selectTree() {
        List<ZtreeNode> ztreeNodeList = departmentDao.selectTree();
        return ztreeNodeList;
    }
}
